package cn.itcast.domain;



import com.github.pagehelper.PageInfo;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Client {
    public Client(int id, String clientName, String clientIdcard, String clientDate, String clientFlag, String clientEndtime, PageInfo<Client> pageInfo) {
        this.id = id;
        this.clientName = clientName;
        this.clientIdcard = clientIdcard;
        this.clientDate = clientDate;
        this.clientFlag = clientFlag;
        this.clientEndtime = clientEndtime;
        this.pageInfo = pageInfo;
    }

    public Client() {
    }

    private int id;
    private String clientName;
    private String clientIdcard;
    private String clientDate;
    private String clientFlag;
    private String clientEndtime;
    private int roomNum;

    public int getRoomNum() {
        return roomNum;
    }

    public void setRoomNum(int roomNum) {
        this.roomNum = roomNum;
    }

    private PageInfo<Client> pageInfo;

    public PageInfo<Client> getPageInfo() {
        return pageInfo;
    }

    public void setPageInfo(PageInfo<Client> pageInfo) {
        this.pageInfo = pageInfo;
    }

    public String getClientEndtime() {
        return clientEndtime;
    }

    public void setClientEndtime(String clientEndtime)  {
        /*SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date parse = sdf.parse(clientEndtime);
        String format = sdf.format(clientEndtime);*/
        this.clientEndtime = clientEndtime;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getClientName() {
        return clientName;
    }

    public void setClientName(String clientName) {
        this.clientName = clientName;
    }

    public String getClientIdcard() {
        return clientIdcard;
    }

    public void setClientIdcard(String clientIdcard) {
        this.clientIdcard = clientIdcard;
    }

    public String getClientDate() {
        return clientDate;
    }

    public void setClientDate(String clientDate) throws ParseException {
        /*SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date parse = sdf.parse(clientDate);
        String date = sdf.format(clientDate);*/
        this.clientDate = clientDate;
    }

    public String getClientFlag() {
        return clientFlag;
    }

    public void setClientFlag(String clientFlag) {
        this.clientFlag = clientFlag;
    }

    @Override
    public String toString() {
        return "Client{" +
                "id=" + id +
                ", clientName='" + clientName + '\'' +
                ", clientIdcard='" + clientIdcard + '\'' +
                ", clientDate='" + clientDate + '\'' +
                ", clientFlag='" + clientFlag + '\'' +
                ", clientEndtime='" + clientEndtime + '\'' +
                ", roomNum=" + roomNum +
                ", pageInfo=" + pageInfo +
                '}';
    }
}
